package com.xiaoxie.boot.service;

import com.github.pagehelper.PageInfo;
import com.xiaoxie.boot.bean.Role;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * @author xiaoxie
 * @create 2022-03-27 22:57
 */
public interface RoleService {

    int insertSelective(Role record);

    int updateByPrimaryKeySelective(Role record);

    Role selectByPrimaryKey(Integer id);

    /**
     * 查询所有角色信息
     * @param role
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Role> selectAllRole(@Param("role") Role role, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteRoleByIds(List<String> ids);

    /**
     * 查询角色名是否重名
     * @param roleName
     * @return
     */
    Role selectRoleName(String roleName);
}
